package com.enwei.activitys;

import com.enwei.base.BaseActivity;
import com.ew.action.R;

import android.os.Bundle;
import android.view.View;
import android.webkit.WebSettings;
import android.webkit.WebView;




public class NewsDetailActivity extends BaseActivity {
    public static final String PARAM_NEWS_CONTENT = "PARAM_NEWS_CONTENT";
    public static final String PARAM_NEWS_TITLE = "PARAM_NEWS_TITLE";
    public static final String PARAM_NEWS_URL = "PARAM_NEWS_URL";

    private WebView webView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_news_detail, true, true);
        webView = (WebView) findViewById(R.id.news_web_view);
        if (getIntent() != null) {
            String newsContent = getIntent().getStringExtra(PARAM_NEWS_CONTENT);
            String title = getIntent().getStringExtra(PARAM_NEWS_TITLE);
            pageTitle.setText(title);
            WebSettings settings = webView.getSettings();
            settings.setDefaultTextEncodingName("utf-8");
            webView.loadDataWithBaseURL(null, newsContent, "text/html", "utf-8", null);
            getLoadingView().setVisibility(View.GONE);
            webView.setVisibility(View.VISIBLE);

        }


    }

   
}
